import fetch from "common/src/utils/fetch";

/**
 *  查询列表
 */
function getExamStudents(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/examStudentQuery",
    method: "post",
    data
  });
}

/**
 *  删除应考学生
 */
function deleteStudent(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/deleteStudentExam",
    method: "post",
    data
  });
}

/**
 *  设置考试。。。
 */
function setExamSituation(data, examSituation) {
  return fetch({
    url:
      "/api/electionservice/examStudentManagement/setExamSituation?examSituation=" +
      examSituation,
    method: "post",
    data
  });
}

/**
 *  设置考试。。。
 */
function changeExamInfo(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/changeSameTimeExamRoom",
    method: "post",
    data
  });
}

/**
 *  导出
 */
function exportExamStudent(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/exportExamStudent",
    method: "post",
    data
  });
}

/**
 *  导出重考大补考
 */
function exportReExamStudent(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/exportReExamStudent",
    method: "post",
    data
  });
}

/**
 *  导出重考大补考(勾选)
 */
function exportSelectedReExamStudent(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/exportSelectedReExamStudent",
    method: "post",
    data
  });
}

/**
 *  设置考试。。。
 */
function arrangeExamStudent(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/arrangeExamStudent",
    method: "post",
    data
  });
}

/**
 *  列表查询
 */
function examStudentQuery(data) {
  return fetch({
    url: "/api/electionservice/examStudentManagement/examStudentQuery",
    method: "post",
    data
  });
}

const pageUrl = "/api/electionservice/examStudentManagement/examStudentQuery";
const examInfopageUrl =
  "/api/electionservice/examStudentManagement/getSameTimeExamRoom";

export default {
  getExamStudents: getExamStudents,
  deleteStudent: deleteStudent,
  setExamSituation: setExamSituation,
  changeExamInfo: changeExamInfo,
  exportExamStudent: exportExamStudent,
  exportSelectedReExamStudent : exportSelectedReExamStudent,
  exportReExamStudent : exportReExamStudent,
  arrangeExamStudent: arrangeExamStudent,
  examStudentQuery: examStudentQuery,
  pageUrl: pageUrl,
  examInfopageUrl: examInfopageUrl
};
